URL Parameter Passing

Set URL parameters using ModifyRedirectUrl

Description
This customization shows how to set the URL parameters using the ModifyRedirectUrl() method.
Variables
Record Control Class
Select a table control in which the two field value controls are present
First Field Value
Select the First field to concatenate
Second Field Value
Select the Second field to concatenate
Applies to
RecordControl class
Code
 
''' 
''' Override the ModifyRedirectURL() to modify the redirect URL.
''' 
Public Overrides Function ModifyRedirectUrl(ByVal redirectUrl As String, ByVal redirectArgument As String, ByVal bEncrypt as Boolean) As String
         
    'Initialize parameterValue to the concatenated valus of two field value controls.
    Dim parameterValue As String = Me.${First Field Value}.Text + Me.${Second Field Value}.Text
	 
    'append the parameter to URL
    redirectUrl = redirectUrl + "?myparam=" + parameterValue
	
	' If the URL already contains paramter(s), for example, if redirect URL is "../Products/EditProducts.aspx?Orders=1" then, you need to modify the redirectURL like this:
	' redirectUrl = redirectUrl + "&myparam=" + parameterValue
    
    return MyBase.ModifyRedirectUrl(redirectUrl, redirectArgument, bEncrypt)

End Function

     

Terms of Service Privacy Statement